package com.situ.mall.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.situ.mall.entity.PageView;
import com.situ.mall.entity.Suggest;
import com.situ.mall.entity.User;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User user);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

	User login(@Param(value = "username")String username,@Param(value = "password") String password);

	User selectByUserId(Integer id);

	int getTotalCount();

	List<User> selectByPage(@Param(value = "offset")int offset, @Param(value = "limit")Integer limit,@Param(value = "user")User user);

	User selectByUserName(@Param(value = "username")String username, @Param(value = "userId")Integer userId);

	int insertSuggest(Suggest suggest);

	User registerByUserName(String username);

	PageView getPageViewById(Integer id);

	int updatePageView(@Param("id")Integer id, @Param("pageView")PageView pageView);
}